package com.xxx.Strings;

/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/16  16:06
 * @Copyright
 */
public class StringDome {
    public static void main(String[] args) {

        /*
         * string类特点：String are constant； their values cannot be change after they are created
         * 字符串常量，值在创建后不能改变
         *
         *构造方法
         * Strin(byte[] bytes)  字节数组 ->字符串
         * String(char[] value) 字符数组 ->字符串
         *
         * */


        byte[] bytes = new byte[]{66, 55, 64, 99};
        char[] chars = {'a','c','b'};
        String s1 = new String(bytes);
        System.out.println(s1);
        System.out.println(chars);



    }
}
